Appendix A. Working with Functions

When working with the application you are allowed to use the following functions:

Format

String Format ([in] value, [in string] format_pattern)

This function returns a value, formatted according to the format pattern. For the value of DateTime formats are valid:

-- o l: Long Date representation appropriate for locale,

-- o s: Short Date representation appropriate for locale,

-- o MM: Month as decimal number (01 - 12),

-- o M: Full month name,

-- o m: Abbreviated month name,

-- o DD: Day of month as decimal number (01 - 31),

-- o YY: Year without century, as decimal number (00 - 99),

-- o YYYY: Year with century, as decimal number,

-- o W: Full weekday name,

-- o w: Abbreviated weekday name,

-- o hh: Hour in 24-hour format (00 - 23)

-- o h: Hour in 12-hour format (01 - 12),

-- o p: Current locale's A.M./P.M. indicator for 12-hour clock,

-- o mm: Minute as decimal number (00 - 59),

-- o ss: Second as decimal number (00 - 59).

MaskFormat

String MaskFormat([in String] value, [in string] mask_format)

String MaskFormat([in numeric] value, [in string] mask_format)

This function returns string value, masked according the mask_format. This function replaces all symbols "0" and "#" in the mask_format to digits from incoming value. For example:

MaskFormat('7-095-79020-27 (cellular)', '+# (###) ###-##-##') returns +7 (095) 790-20-27

Serial

String Serial ([in int] Min_Value, [in int] Max_Value, [in] Current_Value, [in] Increment, [in] ZeroFill)

This function should return Current_Value. After each printing this Current_Value is incremented by IncrementValue. After incrementing, this new value is placed into the parameter of this function in the field code. Parameters have the following meaning:

-- Min_Value: The minimal value.

-- Max_Value: The largest value the field should be allowed to increment to before it is reset to the minimum value.

-- Current_Value: The current value of the field.

-- Increment: The number that should be added to the field to increment it.

-- ZeroFill: This will zero fill the number (i.e. 0000001 instead of 1). Is equal to "yes" or "no".

Trim

String Trim ([in String])

Returns value without beginning and ending spaces

UCase

String UCase ([in String])

Returns value with upper case letters.

LCase

String LCase ([in String])

Returns value with lower case letters.